package com.example.TheParent;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.example.wonderfulradish.MainActivity;
import com.example.wonderfulradish.R;

public class ParentManager extends AppCompatActivity implements View.OnClickListener{
    private TextView time,rule,aboutus;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_parent_manager);
        Button return_main=(Button) findViewById(R.id.return_main);
        return_main.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Intent intent=new Intent(ParentManager.this,MainActivity.class);
                startActivity(intent);
            }
        });
        time=(TextView) findViewById(R.id.managertime);
        time.setOnClickListener(this);
        rule=(TextView) findViewById(R.id.gamerule);
        rule.setOnClickListener(this);
        aboutus=(TextView) findViewById(R.id.aboutus);
        aboutus.setOnClickListener(this);



    }

    public void onClick(View v){
        switch (v.getId()){
            case R.id.managertime:
                Intent intent=new Intent(ParentManager.this,TimeManager.class);
                startActivity(intent);
                break;
            case R.id.gamerule:
                Intent intent1=new Intent(ParentManager.this,GameRule.class);
                startActivity(intent1);
                break;
            case R.id.aboutus:
                Intent intent2=new Intent(ParentManager.this,AboutUs.class);
                startActivity(intent2);
                break;
            default:
                break;
        }
    }
}
